﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SettlementDetailList.aspx.cs" Inherits="weba.Sales.SettlementDetailList" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" Namespace="C1.Web.Wijmo.Controls.C1Input" TagPrefix="wijmo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
     <script type="text/javascript" >
         function OpenModalDialog(url) {
             var newWin = null;
             newWin = window.showModalDialog(url, window, 'dialogHeight:600px;dialogWidth:800px');
             if (newWin == null) {
                 return;
             }
             newWin.open();
         }
   </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" background="../Images/tab_05.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="30">
                                <img src="../Images/tab_03.gif" width="12" height="30" />
                            </td>
                            <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="46%" valign="middle">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="16" height="16" /></div>
                                                    </td>
                                                    <td width="95%">
                                                        <span class="titleBold12px">收支明细列表</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="54%" align="right">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="16" height="30">
                                <img src="../Images/tab_07.gif" width="16" height="30" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="8" background="../images/tab_12.gif">
                                &nbsp;
                            </td>
                            <td align="center">
                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                                    <ProgressTemplate>
                                        <img src="../Images/ajax-loader.gif" alt="" />数据载入中，请稍候...
                                    </ProgressTemplate>
                                </asp:UpdateProgress>
                                <br />
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td align="center">
                                                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="right">
                                                                <asp:Label ID="lblStrWhere" runat="server" Visible="False"></asp:Label>
                                                                <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                                                开始日期：<%--<asp:TextBox ID="txtDateSearchStart" runat="server"></asp:TextBox>
                                                                <AjaxControlToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDateSearchStart"
                                                                    Format="yyyy-MM-dd">
                                                                </AjaxControlToolkit:CalendarExtender>--%><wijmo:C1InputDate ID="txtDateSearchStart" runat="server"></wijmo:C1InputDate>
                                                                结束日期：<%--<asp:TextBox ID="txtDateSearchEnd" runat="server"></asp:TextBox>
                                                                <AjaxControlToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtDateSearchEnd"
                                                                    Format="yyyy-MM-dd">
                                                                </AjaxControlToolkit:CalendarExtender>--%><wijmo:C1InputDate ID="txtDateSearchEnd" runat="server"></wijmo:C1InputDate>
                                                                <asp:CheckBox ID="chkSearchDate" runat="server" Text="查询日期" />
                                                                <br />
                                                                账户：<asp:DropDownList ID="ddlAccountID" runat="server">
                                                                </asp:DropDownList>
                                                                类型：<asp:DropDownList ID="ddlFlag" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlFlag_SelectedIndexChanged">
                                                                    <asp:ListItem Value="1">支出</asp:ListItem>
                                                                    <asp:ListItem Value="2">收入</asp:ListItem>
                                                                    <asp:ListItem Selected="True" Value="0">不限</asp:ListItem>
                                                                </asp:DropDownList>
                                                                收支类别：<asp:DropDownList ID="ddlTypeID" runat="server">
                                                                </asp:DropDownList>
                                                                <br />
                                                                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" />
                                                                分页页数：<asp:TextBox ID="txtPageSize" runat="server" Width="50px"></asp:TextBox>
                                                               
                                                                <asp:Button ID="btnSetPageSize" runat="server" Text="确定" OnClick="btnSetPageSize_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="80%">
                                                              
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" Width="98%"
                                                        DataKeyNames="DetailID,SalesOrderID,PurchaseOrderID,TypeID,Flag,Manager,AccountID"
                                                        OnRowDataBound="myGridView_RowDataBound" ShowFooter="True" OnDataBound="myGridView_DataBound">
                                                        <Columns>
                                                            <asp:BoundField DataField="DetailID" HeaderText="ID" ReadOnly="True">
                                                                <ItemStyle Width="50px" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField HeaderText="账户">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAccountName" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="类型">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblFlag" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="收支类别">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblTypeName" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="DateReckoning" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False"
                                                                HeaderText="日期" />
                                                            <asp:TemplateField HeaderText="金额">
                                                                <FooterTemplate>
                                                                    收入：<asp:Label ID="lblAmountInput" runat="server"></asp:Label>
                                                                    支出：<asp:Label ID="lblAmountOutput" runat="server"></asp:Label>
                                                                </FooterTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblSettlementAmount" runat="server" Text='<%# Bind("SettlementAmount", "{0:c}") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="经办人">
                                                                <FooterTemplate>
                                                                    合计：<asp:Label ID="lblAmount" runat="server"></asp:Label>
                                                                </FooterTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblManager" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="详情">
                                                                <ItemTemplate>
                                                                    <a href="javascript:void(0)" onclick="OpenModalDialog('SettlementDetailShow.aspx?DetailID=<%# Eval("DetailID") %>');">
                                                                        详情</a>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="70px" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                   
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                            <td width="8" background="../images/tab_15.gif">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="35" background="../images/tab_19.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="35">
                                <img src="../images/tab_18.gif" width="12" height="35" />
                            </td>
                            <td align="center">
                                &nbsp;
                            </td>
                            <td width="16">
                                <img src="../images/tab_20.gif" width="16" height="35" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
